//
//  RankingCell.m
//  GSG
//
//  Created by dllo on 15/4/21.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "RankingCell.h"

@implementation RankingCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.view = [[UIView alloc] init];
        [self.contentView addSubview:self.view];
        self.view.alpha = 20;

//        self.view.backgroundColor = [UIColor colorWithRed:196/255.0 green:214/255.0 blue:223/255.0 alpha:1];
    self.view.backgroundColor = [UIColor colorWithWhite:0 alpha:0.3];
        [_view release];
        
        self.pic_urlView = [[UIImageView alloc] init];
//        self.pic_urlView.frame = CGRectMake(10, 10, 100, 145);
        [self.view addSubview:self.pic_urlView];
        [_pic_urlView release];
        
        self.titleLabel = [[UILabel alloc] init];
        self.titleLabel.textColor = [UIColor whiteColor];
        [self.view addSubview:self.titleLabel];
        [_titleLabel release];
        
        self.songNameLabel = [[UILabel alloc] init];
        self.songNameLabel.textColor = [UIColor whiteColor];
        [self.view addSubview:self.songNameLabel];
        [_songNameLabel release];
        
        self.songNameLabel1 = [[UILabel alloc] init];
        self.songNameLabel1.textColor = [UIColor whiteColor];
        [self.view addSubview:self.songNameLabel1];
        [_songNameLabel1 release];

        
        self.songNameLabel2 = [[UILabel alloc] init];
        self.songNameLabel2.textColor = [UIColor whiteColor];
        [self.view addSubview:self.songNameLabel2];
        [_songNameLabel2 release];
        
        self.contentView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bujing.png"]];

    }
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
//    NSLog(@"%.f",self.contentView.frame.size.width);
//    NSLog(@"%.f",self.contentView.frame.size.height);
//    self.view.frame = CGRectMake(10, 10, 350, 130);
//    self.pic_urlView.frame = CGRectMake(0, 0, 130, 130);
//    self.titleLabel.frame = CGRectMake(140, 5, 200, 30);
//    self.songNameLabel.frame = CGRectMake(150, 40, 200, 25);
//    self.songNameLabel1.frame = CGRectMake(150, 70, 200, 25);
//    self.songNameLabel2.frame = CGRectMake(150, 100, 200, 25);
    
        self.view.frame = CGRectMake(self.contentView.frame.size.width*10/375,self.contentView.frame.size.height * 10 / 140, self.contentView.frame.size.width*350/375,self.contentView.frame.size.height * 130 / 140);
        self.pic_urlView.frame = CGRectMake(0,0, self.contentView.frame.size.width*130/375,self.contentView.frame.size.height * 130 / 140);
        self.titleLabel.frame = CGRectMake(self.contentView.frame.size.width*140/375,self.contentView.frame.size.height * 5 /140, self.contentView.frame.size.width*200/375,self.contentView.frame.size.height * 30 / 140);
        self.songNameLabel.frame = CGRectMake(self.contentView.frame.size.width*150/375,self.contentView.frame.size.height * 40 / 140, self.contentView.frame.size.width*200/375,self.contentView.frame.size.height * 25 / 140);
        self.songNameLabel1.frame = CGRectMake(self.contentView.frame.size.width*150/375,self.contentView.frame.size.height * 70 / 140, self.contentView.frame.size.width*200/375,self.contentView.frame.size.height * 25 / 140);
        self.songNameLabel2.frame = CGRectMake(self.contentView.frame.size.width*150/375,self.contentView.frame.size.height * 100 / 140, self.contentView.frame.size.width*200/375,self.contentView.frame.size.height * 25 / 140);
}








@end
